<template>
  <j-modal
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    :title="title"
    :visible="visible"
    cancelText="关闭"
    fullscreen="true"
    @cancel="handleCancel"
    @close="close"
    @ok="handleOk">
    <a-form-item align="center" >
      <iframe :src="vsrc" height="845" frameborder="0" width="1300" scrolling="no"></iframe>
    </a-form-item>
    <template slot="footer">
      <a-button type="primary" @click="close">关闭</a-button>
    </template>
  </j-modal>
</template>

<script>
import { ACCESS_TOKEN,TENANT_ID } from "@/store/mutation-types"
import Vue from 'vue'
export default {
  name: 'ViewModel',
  components: {},
  data() {
    return {
      model: {},
      vsrc:"",
      sjrq: new Date(),
      title: '阜新银行存款利率自律统计月报预览',
      width: 1500,
      height:1000,
      visible: false,
      disableSubmit: false,
      url: {
        importExcelUrl: "reportInfo/llbbDepositLl/importExcel",
      },
    }
  },
  created() {
  },
  computed: {
    //token header
    tokenHeader() {
      let head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
      let tenantid = Vue.ls.get(TENANT_ID)
      if (tenantid) {
        head['tenant-id'] = tenantid
      }
      return head;
    },
  },
  props: {
    handleAdd: {
      type: Function,
      default: null
    }
  },
  methods: {
    showModal(sjrq) {
      var token=Vue.ls.get(ACCESS_TOKEN);
      console.log(this.$route.query)
      var vurl=window._CONFIG['domianURL']+"/jeecg-boot/jmreport/view/621136978490908672?";
      vurl+="token="+token+"&sjrq="+sjrq;
      this.vsrc=vurl;
      this.visible = true
    },
    close() {
      this.$emit('close')
      this.visible = false
    },
    handleCancel(){
      this.close()
    },
    handleOk(){
      this.close()
    }
  }
}
</script>

<style scoped>

</style>